import request from "./request.js"
import api from "./api.js"

// banner
function get_banner_list(params){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.getBannerList,
		method: 'GET',
		data: params
	})
}
// 职位列表
function get_job_list(params){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.getJodList,
		method: 'GET',
		data: params
	})
}
// 学历列表
function get_education_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getEducationList,
		method: 'GET'
	})
}
// 经验列表
function get_exper_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getExperList,
		method: 'GET'
	})
}
// 大分类
function get_classify_list(){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.getClassifyList,
		method: 'GET'
	})
}
// 小分类
function get_cate_list(params){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.getCateList,
		method: 'GET',
		data: params
	})
}
// 职位层级列表
function get_hierarchy_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getHierarchyList,
		method: 'GET'
	})
}
// 授课方式列表
function get_mode_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getModeList,
		method: 'GET'
	})
}
// 薪资范围列表
function get_salary_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getSalaryList,
		method: 'GET'
	})
}
// 求职状态列表
function get_wanted_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getWantedList,
		method: 'GET'
	})
}
// 求职状态列表
function get_entry_list(){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getEntryList,
		method: 'GET'
	})
}
// 福利列表
function get_welfare_list(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getWelfareList,
		method: 'GET',
		data: params
	})
}
// 求职意向详情
function get_job_intention(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getJobIntention,
		method: 'GET',
		data: params
	})
}
// 添加求职意向
function add_job_intention(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.addJobIntention,
		method: 'POST',
		data: params
	})
}
// 修改求职意向
function update_job_intention(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.updateJobIntention,
		method: 'POST',
		data: params
	})
}
// 添加求职意向
function get_job_detail(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getJobDetail,
		method: 'GET',
		data: params
	})
}
// 收藏
function add_coll(params,x_token){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.addColl,
		method: 'POST',
		data: params,
		x_token: x_token
	})
}
// 取消收藏
function cancel_coll(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.cancelColl,
		method: 'GET',
		data: params
	})
}
// 个人简历详情
function get_resume_detail(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getResumeDetail,
		method: 'GET',
		data: params
	})
}
// 教师投递简历
function delivery_resume(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.deliveryResume,
		method: 'POST',
		data: params
	})
}
// 机构邀请老师
function unit_invitation(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.unitInvitation,
		method: 'POST',
		data: params
	})
}
// 机构详情
function get_mech_detail(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getMechDetail,
		method: 'GET',
		data: params
	})
}
// 搜索机构列表
function get_mech_list(params){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.searchOrg,
		method: 'GET',
		data: params
	})
}
// 老师列表
function get_teacher_list(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getTeacherList,
		method: 'GET',
		data: params
	})
}
// 老师详情
function get_teacher_detail(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getTeacherDetail,
		method: 'GET',
		data: params
	})
}
// 查询单位发布过的职位
function get_job_bymech(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getJobBymech,
		method: 'GET',
		data: params,
	})
}
// 发布职位
function positionInfoAdd(params,x_token){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.positionInfoAdd,
		method: 'POST',
		data: params,
		x_token:x_token
	})
}
// 修改删除上下架职位
function positionInfoUpdateById(params,x_token){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.positionInfoUpdateById,
		method: 'POST',
		data: params,
		x_token:x_token
	})
}
// 职位收藏列表
function get_job_colls(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getJobColls,
		method: 'GET',
		data: params,
	})
}
// 简历收藏列表
function get_resume_colls(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getResumeColls,
		method: 'GET',
		data: params,
	})
}
// 机构收藏列表
function get_mech_colls(params){
	return new request.tokenRequest({
		url: api.data.requestUrl + api.data.getMechColls,
		method: 'GET',
		data: params,
	})
}
// 职位管理列表
function get_ment_list(params){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.getMentList,
		method: 'GET',
		data: params
	})
}
// 搜索职位列表
function search_jobs(params){
	return new request.baseRequest({
		url: api.data.requestUrl + api.data.searchJobs,
		method: 'GET',
		data: params
	})
}

module.exports = {
	get_banner_list: get_banner_list,
	get_job_list: get_job_list,
	get_education_list: get_education_list,
	get_exper_list: get_exper_list,
	get_classify_list: get_classify_list,
	get_cate_list: get_cate_list,
	get_hierarchy_list: get_hierarchy_list,
	get_mode_list: get_mode_list,
	get_salary_list: get_salary_list,
	get_wanted_list: get_wanted_list,
	get_entry_list: get_entry_list,
	get_welfare_list: get_welfare_list,
	get_job_intention: get_job_intention,
	add_job_intention: add_job_intention,
	update_job_intention: update_job_intention,
	get_job_detail: get_job_detail,
	add_coll: add_coll,
	cancel_coll: cancel_coll,
	get_resume_detail: get_resume_detail,
	delivery_resume: delivery_resume,
	unit_invitation: unit_invitation,
	get_mech_detail: get_mech_detail,
	get_mech_list: get_mech_list,
	get_teacher_list: get_teacher_list,
	get_teacher_detail: get_teacher_detail,
	get_job_bymech: get_job_bymech,
	positionInfoAdd,
	positionInfoUpdateById,
	get_job_colls,
	get_resume_colls,
	get_mech_colls,
	get_ment_list,
	search_jobs
}